<template>
	<view class="">
		<view class="position-relative" style="height: 3400rpx;">
			<view class="w-100 position-absolute" style="z-index: 10;margin-bottom: 400rpx;">
				<image :src="Domain_ICON+'/shuang11.webp'" mode="widthFix" class="img"></image>
				<view class="position-absolute w-100" style="bottom: 0;height: 180rpx;">
				</view>
			</view>
			<!-- 失效优惠券 -->
			<view @click="yhqClick" class="position-absolute"
				style="margin-left:190rpx;z-index: 20;height: 150rpx;top: 635rpx;width: 48%;">
			</view>
			<!-- 商品信息 -->
			<view class="position-absolute" style="margin-left: 76rpx; z-index: 20;top: 1380rpx;width: 76%;">
				<view class="w-100" @click="productClick(item)" v-for="(item,index) in double11List.slice(0,3)"
					:key="index" style="height: 440rpx;margin-bottom: 105rpx;">
				</view>
			</view>
			<view class="w-100 position-absolute" style="z-index: 50; bottom: 0;">
				<botSponsor bgHeight="280rpx"></botSponsor>
			</view>
		</view>
		<view class="position-fixed fixed-bottom" style="height: 110rpx;z-index: 100;">
			<tabsBottom></tabsBottom>
		</view>
	</view>
</template>

<script>
	const app = getApp();
	import tabsBottom from "@/components/tabs/tabs-bottom.vue";
	import botSponsor from "@/components/botsponsor/sponsor.vue"
	import {
		getJsonInquiry
	} from '@/api/global.js'
	import {
		getWX2GoodsIdAction
	} from "@/api/index.js"
	export default {
		components: {
			tabsBottom,
			botSponsor
		},
		data() {
			return {
				double11List: [],
				Domain_ICON: app.globalData.Domain_ICON,
			}
		},
		onLoad(option) {
			this.getWX2GoodsIdAction("C00000000000045")
			// this.getData('hmgx/gxydouble11.json')
		},
		methods: {
			yhqClick() {
				uni.showToast({
					title: '该优惠券已失效',
					icon: "none"
				});
			},
			async getWX2GoodsIdAction(ShopColumn_Id) {
				const res = await getWX2GoodsIdAction({
					ShopColumn_Id,
					Open_ID: app.globalData.Open_ID,
					page: 1,
					limit: 20
				})
				if (res.Status == "success") {
					this.double11List = res.tableData;
					this.double11List.reverse();
				}
				//console.log(this.double11List, '商品');
			},
			// async getData(File){
			// 	const res = await getJsonInquiry({File})
			// 	if(res.Status == 'success'){
			// 		this.double11List =  JSON.parse(res.Data) 
			// 	}
			// 	//console.log(this.double11List)
			// },
			// 点击商品,进入商品详情页
			productClick(item) {
				uni.navigateTo({
					url: "/pages/index/productDetails?name=" + item.Article_Name + "&Article_SerialNumber=" +
						item.Article_SerialNumber + "&Sales_Unit_Price_SerialNumber=" + item
						.Sales_Unit_Price_SerialNumber +
						"&Store_SerialNumber=" + item.Store_SerialNumber+'&ShopColumn_Id=' + item.ShopColumn_Id
				})
			},
		}
	}
</script>

<style>
</style>